using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace HRM.Models.Mapping
{
    public class dk_GiangDayNgoaiTruongMap : EntityTypeConfiguration<dk_GiangDayNgoaiTruong>
    {
        public dk_GiangDayNgoaiTruongMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.NoiLamViec)
                .HasMaxLength(100);

            this.Property(t => t.TenNV)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.MaDDKy)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("dk_GiangDayNgoaiTruong");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.NoiLamViec).HasColumnName("NoiLamViec");
            this.Property(t => t.SoGio).HasColumnName("SoGio");
            this.Property(t => t.TenNV).HasColumnName("TenNV");
            this.Property(t => t.MaDDKy).HasColumnName("MaDDKy");
        }
    }
}
